﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using Microsoft.Phone.Controls.Maps;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Device.Location;
using System.Device;

namespace SimpleRadar
{
    public static class PushpinEx
    {
        public static void Create(this Pushpin pushpin,string tag,GeoCoordinate Location,string content)
        {
            pushpin.Tag = tag;
            pushpin.Location = Location;
            pushpin.Content = content;
        }
        public static void SetImage(this Pushpin pushpin,System.Windows.Media.Imaging.BitmapImage image)
        {
            ImageBrush ib = new ImageBrush();

            ib.ImageSource = image;

            pushpin.Background = ib;
        }
        public static void SetImage(this Pushpin pushpin,Uri uri)
        {
            ImageBrush ib = new ImageBrush();

            ib.ImageSource = new System.Windows.Media.Imaging.BitmapImage(uri);

            pushpin.Background = ib;
        }
    }
}
